<?php
declare(strict_types=1);
namespace App\Model\Topic;

use Carbon\Carbon;
use Hyperf\DbConnection\Model\Model;

/**
 * @property int $id 主键
 * @property int $details_id 存储模式 (1 本地 2 阿里云 3 七牛云 4 腾讯云)
 * @property int $format 存储模式 (1 本地 2 阿里云 3 七牛云 4 腾讯云)
 * @property int $type 字节数
 * @property string $title 文件大小
 * @property string $title_img 文件大小
 * @property string $details url地址
 * @property Carbon $created_at 创建时间
 * @property Carbon $updated_at 更新时间
 * @property Carbon $deleted_at 更新时间
 */
final class Topic extends Model
{
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'topic';

    /**
     * 隐藏的字段列表.
     * @var string[]
     */
    protected array $hidden = [];

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'details_id', 'format', 'type', 'title', 'title_img', 'details', 'created_at', 'updated_at','deleted_at'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = [
        'id' => 'integer',
        'details_id' => 'integer',
        'format' => 'integer',
        'type' => 'integer',
        'created_by' => 'integer',
        'updated_by' => 'integer',
        'created_at' => 'datetime',
        'updated_at' => 'datetime',
        'deleted_at' => 'datetime',
        'details' => 'json',
    ];
}